#include <stdio.h>
#include "LinkList.h"

void TestReverseLinkList()
{
	int data[] = {1, 2, 3, 4, 5}; 
	LinkNode* list = BuildLinkList(data, sizeof(data)/sizeof(data[0]));
	ShowLinkList(list);

	list = ReverseLinkList(list);
	ShowLinkList(list);
}

void TestLinkListCircle()
{
	int data[] = {1, 2, 3, 4, 5}; 

	LinkNode* list = BuildLinkList(data, sizeof(data)/sizeof(data[0]));
	if (IsCircleLinkList(list))
	{
		printf(" list is link list\n");
	}
	else
	{
		printf("list is not link list\n");
	}

	LinkNode* list1 = BuildCircleLinkList(data, sizeof(data)/sizeof(data[0]));

	if (IsCircleLinkList(list1))
	{
		printf("list1 is link list\n");
	}
	else
	{
		printf("list1 is not link list\n");
	}
}

int main(int argc, char* argv[])
{
	TestLinkListCircle();

	return 0;
}